import com.pattern.command.frame.CommandChain;
import com.pattern.command.tenant.Command1;
import com.pattern.command.tenant.Command2;
import com.pattern.command.tenant.Command3;

public class Main {


    public static void main(String[] args) {
        CommandChain chain = new CommandChain();
        Command1 cmd1 = new Command1("zhangsan");
        Command2 cmd2 = new Command2("iphone001");
        Command3 cmd3 = new Command3(cmd1, cmd2);
        boolean result = chain.addCommand(cmd1)
                .addCommand(cmd2)
                .addCommand(cmd3)
                .executeCommands();
    }
}
